<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<title>角色详情</title>
		<script type="text/javascript" src="<%=request.getContextPath()%>/res/js/jquery-1.6.4.js"></script>
		<link href="<%=request.getContextPath()%>/res/css/blue/mainPage.css" rel="stylesheet" type="text/css" />
		<script src="<%=request.getContextPath()%>/res/js/initPage.js" type="text/javascript"></script>
		<link href="<%=request.getContextPath()%>/res/common/zTree/css/zTreeStyle.css" rel="stylesheet" type="text/css"/>
		<script type="text/javascript">
    	var contextPath = '<%=request.getContextPath()%>';
    	$(document).ready(function(){
	    	beautifyBottomButton(['bnt_Ok']);
	    	$("#bnt_Ok").click(function(){
				window.top.frames['iframeMenuContent'].closeDialog();
			});

			parseUri.init();
			var _roleId = parseUri.getParam('id');
			var nodes = [];
			var setting = {
				data: {
					simpleData: {
						enable: true
					}
				}
			};
			$.getJSON(contextPath+'/security/getOpsByRoleId.html?id='+_roleId,function(data){
				if(data.code=='200'){
					$.each(data.objContent,function(i,item){
						var itemNode = {};
					    itemNode.id = item.opsId;
						itemNode.name = item.opsName;
						itemNode.pId = item.parentId;
						itemNode.open = true;
						if(item.opsType==1){
							itemNode.icon = contextPath+'/res/imgs/blue/opt_menu.png';
						}
						else if(item.opsType==2){
							itemNode.icon = contextPath+'/res/imgs/blue/opt_page.png';
						}
						else if(item.opsType==3){
							itemNode.icon = contextPath+'/res/imgs/blue/opt_operate.png';
						}
						else{
						}
						nodes[i] = itemNode;
					});
					$.fn.zTree.init($("#ul_Tree"), setting, nodes);
				}
				else{
					alert(data.content);
				}
			});
		});
    	</script>
	</head>
	<body>
	    <table class="tableWrap" border="0" width="100%" cellpadding="2" cellspacing="1">
	     <tr class="tdbg">
            <td class="tdbgleft" width="135px" align="right"><strong>角色ID：</strong></td>
            <td>${bean.roleId}</td>
        </tr>
	    <tr class="tdbg">
            <td class="tdbgleft" width="135px" align="right"><strong>角色名称：</strong></td>
            <td>${bean.roleName}</td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft" width="135px" align="right"><strong>所属系统：</strong></td>
            <td>${bean.systemName}</td>
        </tr>
         <tr class="tdbg">
            <td class="tdbgleft" width="135px" align="right"><strong>拥有权限：</strong></td>
            <td>
				<div id="div_Tree" class="zTreeDemoBackground left">
					<ul id="ul_Tree" class="ztree"></ul>
				</div>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft" width="105px" align="right"><strong>角色描述：</strong></td>
            <td>${bean.roleDesc}</td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft" width="105px" align="right">
            <strong>创建时间：</strong><br/>
            </td>
            <td>${bean.createTime}</td>
        </tr>
         <tr class="tdbg">
            <td class="tdbgleft" width="105px" align="right">
            <strong>创建者：</strong><br/>
            </td>
            <td>${bean.createUser}</td>
        </tr>
         <tr class="tdbg">
            <td class="tdbgleft" width="105px" align="right">
            <strong>修改时间：</strong><br/>
            </td>
            <td>${bean.lastEditTime}</td>
        </tr>
         <tr class="tdbg">
            <td class="tdbgleft" width="105px" align="right">
            <strong>修改者：</strong><br/>
            </td>
            <td>${bean.lastEditUser}</td>
        </tr>
     </table>
     <table border="0" width="100%" cellpadding="2" cellspacing="1" style="margin-top: 20px;">
     	<tr class="height25">
        	<td colspan="2" align="center">
        		<input id="bnt_Ok" type="button" class="inputbutton" value=" 确 定 "/>&nbsp;&nbsp;
        	</td>
        </tr>
     </table>
<script src="<%=request.getContextPath()%>/res/common/zTree/js/jquery.ztree.core-3.5.min.js" type="text/javascript"></script>
	</body>
</html>